package com.sugon.utils;

import com.sugon.modules.sys.consts.SysPerms;

/**
 * 流程类型枚举类
 *
 * @author YuXD
 * @since 2020-08-22 12:20
 */
public enum ProcessInfoEnum {

    MDE_YJWH(SysMsgType.APPROVAL_REMIND, "MDE_YJWH", "模具紧急维护审批", "../module/modulerepairrocord.html?Id={}", "当前模具故障属于普通状况，原因：{}，稍后生成临时停机记录！", "", SysPerms.MDE_YJWH_REVIEW),
    MDE_WXTX(SysMsgType.REPAIR_REMIND, "MDE_WXTX", "维修派工提醒", "", "../module/modulerepairrocord.html?Id={}", "", SysPerms.MDE_EXCUTE_PERMS),
    MDE_DQWH(SysMsgType.APPROVAL_REMIND, "MDE_DQWH", "模具定期维护计划审批", "../module/modulemaintainplan.html?Id={}", "模具定期维护计划[{}]未通过审核，原因：{}", "", SysPerms.MDE_DQWH_REVIEW),


    DEV_WHJH(SysMsgType.APPROVAL_REMIND, "DEV_WHJH", "设备维护计划审批", "../device/devplanmain.html?Id={}", "维护计划[{}]未通过审核，原因：{}", "", SysPerms.DEV_WHJH_REVIEW),
    DEV_WHGC(SysMsgType.APPROVAL_REMIND, "DEV_WHGC", "设备维护规程审批", "../device/devmaintenplan.html?Id={}", "规程[{}]未通过审核，原因：{}", "", SysPerms.DEV_WHGC_DEPT_REVIEW, SysPerms.DEV_WHGC_PE_REVIEW),
    DEV_SBQD(SysMsgType.APPROVAL_REMIND, "DEV_SBQD", "设备清单审批", "../sys/deviceinfo.html?devId={}", "设备[{}]未通过审核，原因：{}", "", SysPerms.DEV_SBQD_DEPT_REVIEW),
    DEV_WHGD(SysMsgType.APPROVAL_REMIND, "DEV_WHGD", "设备维护计划变更审批", "../device/devplangc.html?Id={}", "设备维护变更[{}]未通过审核，原因：{}", "", SysPerms.DEV_WHGD_DEPT_REVIEW),

    SPECDEV_CHECK_REMIND(SysMsgType.MAINTAIN_REMIND, "SPECDEV_CHECK_REMIND", "特种设备校验提醒", "../device/devspeccheck.html?Id={}", "", "", SysPerms.SPECDEV_CHECK_REMIND),

    SPA_BJGL(SysMsgType.APPROVAL_REMIND, "SPA_BJGL", "备件管理审批", "", "备件[{}]未通过审核，原因：{}", "备件已通过审核，只有特殊人员才可以修改通过审核后的备件信息！", SysPerms.SPA_BASE_REVIEW),
    SPA_BJXQ(SysMsgType.APPROVAL_REMIND, "SPA_BJXQ", "备件需求计划审批", "../spare/sparepartrequ.html?Id={}", "", "", SysPerms.SPA_NEED_SPLAN_DEPT_REVIEW, SysPerms.SPA_NEED_SPLAN_PE_REVIEW, SysPerms.SPA_NEED_SPLAN_PE2_REVIEW),
    SPA_BJAQKC(SysMsgType.APPROVAL_REMIND, "SPA_BJAQKC", "车间备件安全库存审批", "../spare/sparepartsafestock.html?Id={}", "", "", SysPerms.SPA_SAFE_STOCK_REVIEW),
    SPA_RK(SysMsgType.SPARE_PART_IN_REMIND, "SPA_RK", "备件采购入库通知", "../spare/sparepartin.html?Id={}", "", "", null),
    SPA_KTHJ(SysMsgType.APPROVAL_REMIND, "SPA_KTHJ", "备件可替换件审批", "../spare/spareDev.html?Id={}", "备件添加可替换件[{}]未通过审核，原因：{}", "", SysPerms.SPA_ADD_REPLACABLE_REVIEW),//车间设备技术室主管

    TLS_GZML(SysMsgType.APPROVAL_REMIND, "TLS_GZML", "工装清单审核", "../tools/toolslist.html?Id={}", "工装[{}]未通过审核，原因：{}", "", SysPerms.TOOLS_BASE_REVIEW),
    TLS_GZZQJCGL(SysMsgType.APPROVAL_REMIND, "TLS_GZZQJCGL", "工装周期性精度检测计划审核", "../tools/toolscheckplan.html?Id={}", "工装[{}]精度检测计划未通过审核，原因：{}", "", SysPerms.TOOLS_CHECK_REVIEW),

    MOLD_REPAIR_RP(SysMsgType.APPROVAL_REMIND, "MOLD_REPAIR_RP", "模具维修换件审批", "../module/modulerepairrocord.html?Id={}", "模具[{}]未通过审核，原因：{}", "", SysPerms.MDE_REPLACEPART_DEPT_REVIEW),
    MOLD_MAINTENANCE_RP(SysMsgType.APPROVAL_REMIND, "MOLD_MAINTENANCE_RP", "模具维护换件审批", "../module/modulePlanWork.html?Id={}", "模具[{}]未通过审核，原因：{}", "", SysPerms.MDE_REPLACEPART_DEPT_REVIEW),
    MDE_BJGH(SysMsgType.APPROVAL_REMIND, "MDE_BJGH", "模具换件审批", "../module/modulereplacepart.html?Id={}", "模具[{}]未通过审核，原因：{}", "", SysPerms.MDE_REPLACEPART_DEPT_REVIEW),

    DEV_ZXGD(SysMsgType.REPAIR_REMIND, "DEV_ZXGD", "执行工单提醒", "../device/devmaintenwork.html?Id={}", "", "", SysPerms.DEV_WX_DISPATCH_REMIND),

    DEV_WXPG(SysMsgType.REPAIR_REMIND, "DEV_WXPG", "维修派工提醒", "", "", "", null),
    DEV_SBXZ(SysMsgType.APPROVAL_REMIND, "DEV_SBXZ", "设备闲置审批", "", "../sys/devleaverecord.html?devId={}", "设备[{}]闲置申请未通过审核，原因：{}", SysPerms.DEV_SBXZ_REVIEW),//车间设备技术室主管

    DEV_JSDA(SysMsgType.APPROVAL_REMIND, "DEV_JSDA", "技术档案审核", "", "", "", null),//车间设备技术室主管
    DEV_XZPC(SysMsgType.APPROVAL_REMIND, "DEV_XZPC", "协助排查提醒", "", "", "", null),
    DEV_QRXG(SysMsgType.APPROVAL_REMIND, "DEV_QRXG", "确认效果提醒", "", "", "", null),
    DEV_XJTX(SysMsgType.APPROVAL_REMIND, "DEV_XJTX", "巡检提醒", "", "", "", null),
    DEV_EDSP(SysMsgType.APPROVAL_REMIND, "DEV_EDSP", "8D审批", "", "", "", null),//车间设备技术室主管
    DEV_YCGZ(SysMsgType.APPROVAL_REMIND, "DEV_YCGZ", "异常跟踪审批", "", "", "", null),
    DEV_XJGL(SysMsgType.APPROVAL_REMIND, "DEV_XJGL", "修旧利废、改良改善", "", "", "", null),//车间设备技术室主管
    SPA_RKSP(SysMsgType.APPROVAL_REMIND, "SPA_RKSP", "入库审批", "", "", "", null),
    SPA_CKSP(SysMsgType.APPROVAL_REMIND, "SPA_CKSP", "领料单审批", "", "", "", null),//车间设备技术室主管
    SPA_TKSP(SysMsgType.APPROVAL_REMIND, "SPA_TKSP", "退库审批", "", "", "", null),
    SPA_BJBF(SysMsgType.APPROVAL_REMIND, "SPA_BJBF", "备件报废审批", "", "", "", null),//车间设备技术室主管

    TLS_GZDA(SysMsgType.APPROVAL_REMIND, "TLS_GZDA", "工装档案审核", "", "", "", null),
    TLS_TKSH(SysMsgType.APPROVAL_REMIND, "TLS_TKSH", "退库审核", "", "", "", null),
    TLS_XQJH(SysMsgType.APPROVAL_REMIND, "TLS_XQJH", "工装需求计划审批", "", "", "", null),
    TLS_WGGZLZ(SysMsgType.APPROVAL_REMIND, "TLS_WGGZLZ", "外购工装质量问题", "", "", "", null),
    MDE_MJZL(SysMsgType.APPROVAL_REMIND, "MDE_MJZL", "模具资料管理审批", "", "", "", null),
    MDE_WHGC(SysMsgType.APPROVAL_REMIND, "MDE_WHGC", "模具维护项失效审批", "", "", "", null),

    MDE_YCJL(SysMsgType.APPROVAL_REMIND, "MDE_YCJL", "模具异常记录审批", "", "", "", null),
    POE_WHWX(SysMsgType.APPROVAL_REMIND, "POE_WHWX", "维护维修审批", "", "", "", null),
    POE_XQJH(SysMsgType.APPROVAL_REMIND, "POE_XQJH", "需求计划审批", "", "", "", null),
    MDE_WHZH(SysMsgType.APPROVAL_REMIND, "MDE_WHZH", "模具维护综合记录", "", "", "", null),
    POE_FBXJZZ(SysMsgType.APPROVAL_REMIND, "POE_FBXJZZ", "非标零件制作审批", "", "", "", null),
    TLS_GZBF(SysMsgType.APPROVAL_REMIND, "TLS_GZBF", "工装报废审核", "", "", "", null),
    MDE_GLGS(SysMsgType.APPROVAL_REMIND, "MDE_GLGS", "改良改善台账", "", "", ""),
    DEV_RECHECK(SysMsgType.APPROVAL_REMIND, "DEV_RECHECK", "8D复审", "", "", ""),
    DEV_XJJH(SysMsgType.APPROVAL_REMIND, "DEV_XJJH", "巡检计划", "", "", "", null),
    DEV_GDJS(SysMsgType.APPROVAL_REMIND, "DEV_GDJS", "工单分配", "", "", "", null);

    /**
     * 值
     */
    private String value;

    /**
     * 描述
     */
    private String desc;

    /**
     * 审批路径URL
     */
    private String approveUrl;

    /**
     * 通过审核的消息
     */
    private String passedMsgTemplate;

    /**
     * 未通过审核的消息
     */
    private String notPassedMsgTemplate;

    /**
     * 审批用户角色
     */
    private SysPerms[] sysPerms;

    /**
     * 消息类别
     */
    private Integer msgType;

    public String getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public String getPassedMsgTemplate() {
        return passedMsgTemplate;
    }

    public String getNotPassedMsgTemplate() {
        return notPassedMsgTemplate;
    }

    public SysPerms[] getSysPerms() {
        return sysPerms;
    }

    public String getApproveUrl() {
        return approveUrl;
    }

    ProcessInfoEnum(Integer msgType, String value, String desc, String approveUrl, String notPassedMsgTemplate, String passedMsgTemplate, SysPerms... sysPerms) {
        this.msgType = msgType;
        this.value = value;
        this.desc = desc;
        this.approveUrl = approveUrl;
        this.passedMsgTemplate = passedMsgTemplate;
        this.notPassedMsgTemplate = notPassedMsgTemplate;
        this.sysPerms = sysPerms;
    }

    public Integer getMsgType() {
        return msgType;
    }
}
